import subprocess

# 定义命令和参数
script_name = "demo_voca.py"
wav_path = "test.wav"
subject = "FaceTalk_170908_03277_TA"

# 构建命令
command = [
    "python", 
    script_name, 
    "--wav_path", wav_path, 
    "--subject", subject
]

# 运行命令
try:
    result = subprocess.run(command, check=True, text=True, capture_output=True)
    print("Output:\n", result.stdout)
except subprocess.CalledProcessError as e:
    print("Error:\n", e.stderr)
